const express = require('express');
const db = require('./db/index');
const Students = require('./models/studentsSchema');
const app = express();
(async () => {
    await db;
    const result = await Students.create({
        name: 'tom',
        age: 12,
        sex: '男',
        stu_id: '01',
        createDate: Date.now(),
        info: '吃饭睡觉打豆豆'
    });
    console.log(result);
})()
app.listen(8080, err => {
    if (!err) console.log('server启动');
    else console.log(err);
})